const express = require('express');
// 路由中间件
const router = express.Router();

// 2.用户user

/* 
    http://localhost:2003/user/login

    username:kuiya  
    password:123456

    body:x-www-form-urlencoded
*/
router.post('/login',(req,res)=>{
    let {username,password} = req.body;
    res.send({
        username,
        password
    })
})


/* 
    http://localhost:2003/user/reg

    username:kuiya  
    password:123456

    body:x-www-form-urlencoded
*/
router.post('/reg',(req,res)=>{
    let {username,password} = req.body;
    res.send({
        username,
        password
    })
})

module.exports = router;